'use strict';

var mongoose = require('mongoose');
var modelPlugin = require("../model.plugin");
var Schema = mongoose.Schema;
var ObjectId  = Schema.ObjectId;

var operatorSchema = new Schema({
  name: {type: String},
  icon: {type: String},
  action: {type: String},
  //{0: disable, 1: used, 2: ...}
  state: {type: Number, enum:[0, 1, 2], default: 1}
});

operatorSchema.plugin(modelPlugin);
// operatorSchema.index({feature: 1});

mongoose.model('Operator', operatorSchema);
